

import socket


def domain_to_ip(host='11111ddns.cs-iot.cn'):
    ip=''
    try:
        ip = socket.gethostbyname(host)
        print(f"The IP address of {host} is {ip}")
    except socket.gaierror:
        print(f"{host} is not a valid hostname.")

    return ip



if __name__ == "__main__":
    domain_ip = domain_to_ip()
    print(domain_ip)

